package com.xx.javabean;

public class Test {
    public static void main(String[] args) {
        //1.调用无参构造器创建对象
        User u=new User();
        u.setName("小明");
        u.setHeight(185.5);
        u.setSalary(1000);
        System.out.println(u.getName());
        System.out.println(u.getHeight());
        System.out.println(u.getSalary());

        //2.调用有参构造啊创建对象
        User u2=new User("小红",169.5,5000);
        System.out.println(u2.getName());
        System.out.println(u2.getHeight());
        System.out.println(u2.getSalary());
    }
}
